package org.jeecg.modules.workorder.vo;

import java.io.Serializable;
import java.io.UnsupportedEncodingException;

import org.jeecg.common.aspect.annotation.Dict;

import lombok.Data;

@Data
public class WorkingOrderPageVO implements Serializable {

	private static final long serialVersionUID = 1L;
	
	/** 主键ID */
	private java.lang.String id;

	/** 父工单号 */
	private java.lang.String pid;

	/** 是否有子工单 */
	@Dict(dicCode = "yn")
	private java.lang.String hasChild;

	/** 工单号 */
	private java.lang.String workNum;

	/** 合并单的工单号和拆分页 */
	private java.lang.String mergedWorknumAndPn;

	/** 拆分页 */
	private java.lang.String pn;

	/** 工单类型 */
	@Dict(dicCode = "work_order_type")
	private java.lang.Integer workOrderType;

	/** 存货人 */
	@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
	private java.lang.String storeBy;

	/** 存货部门 */
	@Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "org_code")
	private java.lang.String storeDept;

	/** 存货数量 */
	private java.lang.Integer count;

	/** 状态 */
	@Dict(dicCode = "work_store_status")
	private java.lang.Integer storeStatus;

	/** 是否拆过子单。0=否 1=是 */
	@Dict(dicCode = "yn")
	private java.lang.Integer isSplited;

	/** 是否被合并。0=否 1=是 */
	@Dict(dicCode = "yn")
	private java.lang.Integer isMerged;

	/** 备注 */
	private java.lang.String remark;

	/** 款名 */
	@Dict(dictTable = "style_customer_info", dicText = "name", dicCode = "id")
	private java.lang.String styleCusInfoId;

	/** 订单号 */
	@Dict(dictTable = "order_info", dicText = "code_num", dicCode = "id")
	private java.lang.String orderInfoId;

	/** 当前做货记录ID */
	private java.lang.String currWorkingOrderRecordId;

	/** 款号 */
	private java.lang.String styleCodeNum;
	
	/** 净金重 */
	private java.math.BigDecimal goldWeight;

	/** 石重 */
	private java.math.BigDecimal pureStoneWeight;

	/** 连石重 */
	private java.math.BigDecimal withStoneWeight;

	/** 净银重 */
	private java.math.BigDecimal silverModelWeight;

	/** 蜡重 */
	private java.math.BigDecimal waxModelWeight;
	
	/** 其他配件重 */
	private java.math.BigDecimal otherAccessoryWeight;

	/** 不计耗重 */
	private java.math.BigDecimal noAttritionWeight;

	/** 配件数 */
	private java.lang.Integer accessoryCount;

	/** 耗率(%) */
	private java.math.BigDecimal attritionRate;

	/** 给耗 */
	private java.math.BigDecimal giveAttrition;

	/** 水口或链尾 */
	private java.math.BigDecimal gate;

	/** 原重量 */
	private java.math.BigDecimal originalWeight;

	/** 差额 */
	private java.math.BigDecimal difference;
	
	/** 工序单价工费 */
	private java.math.BigDecimal procedureUnitPrice;
	
	/** 工序总工费 */
	private java.math.BigDecimal procedureTotalPrice;
    
	/** 图片 */
	private byte[] styleImage;

	/** 图片 */
	private transient java.lang.String styleImageString;

	public byte[] getStyleImage() {
		if (styleImageString == null) {
			return null;
		}
		try {
			return styleImageString.getBytes("UTF-8");
		} catch (UnsupportedEncodingException e) {
			e.printStackTrace();
		}
		return null;
	}

	public String getStyleImageString() {
		if (styleImage == null || styleImage.length == 0) {
			return "";
		}
		try {
			return new String(styleImage, "UTF-8");
		} catch (UnsupportedEncodingException e) {
			e.printStackTrace();
		}
		return "";
	}
    
}
